package top.huxy.boot.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.huxy.boot.model.entity.VisitLog;
import top.huxy.boot.model.vo.VOVisitorCityInfo;

import java.util.List;
import java.util.Map;

/**
 * @Classname VisitLogMapper
 * @Description VisitLogMapper
 * @Date 2021/9/17 9:31
 * @Created by huxy
 */
@Mapper
@Repository
public interface VisitLogMapper {
    @Deprecated
    List<VisitLog> getVisitLogList(int leftIndex, int rightIndex);

    int getVisitLogCount();

    int addLog(VisitLog log);

    VisitLog getVisitLogByRequestId(String requestId);

    List<VisitLog> getVisitLogListByFilter(Map<String, Object> queryMap);

    List<VOVisitorCityInfo> getVisitorCityInfo();

    int getVisitorCount(long between, long and);

    int getUniqueIpCount();

    int getNewUniqueIpCount(long lastDate);

    List<Map<String, Object>> getVisitorCountGroupByDays(@Param("start") long start, @Param("end") long end, @Param("days") List<String> days);
}
